package com.hxf.service.privilege.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hxf.dto.PrivilegeDto;
import com.hxf.exception.DaoLevelException;
import com.hxf.exception.ServiceException;
import com.hxf.service.base.impl.BaseServiceImpl;
import com.hxf.service.privilege.PrivilegeService;

/**
 * service菜单管理业务类
 * @author tengyicheng
 * @version [1.0, 2013/09/22]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@Repository("privilegeService")
public class PrivilegeServiceImpl extends BaseServiceImpl implements PrivilegeService {

	@Override
	public List<PrivilegeDto> findByMenuId(Integer menuId) throws ServiceException {
		try {
			return super.getDaoFacade().getPrivilegeDao().findByMenuId(menuId);
		} catch (DaoLevelException e) {
			throw new ServiceException(e.getMessage(), e);
		} 
	}

}
